<?php ob_start() ?>

<div class="row">
    <?php if (isset($_SESSION['adminbetporra_msj'])) { ?>
        <div class="alert alert-success alert-dismissable col-lg-12 text-center">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <strong><?php echo $_SESSION['adminbetporra_msj'] ?></strong>
        </div>
        <?php
        unset($_SESSION['adminbetporra_msj']);
    }
    ?>
    <div class="col-lg-12">
        <h1>Regalos <small>Listado Regalos</small></h1>
    </div>
</div>
<hr>
<div class="row">
    <div class="col-lg-12">
        <a class="btn btn-primary" href="registro_regalo"><i class="fa fa-plus-circle"></i> Nuevo Regalo</a>
        <hr>
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-suitcase"></i> Regalos</h3>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped tablesorter" id="dataTables-example">
                        <thead>
                            <tr>
                                <th>Nombre <i class="fa fa-sort"></i></th>
                                <th>Descripción <i class="fa fa-sort"></i></th>
                                <th>Disponible <i class="fa fa-sort"></i></th>
                                <th>Precio <i class="fa fa-sort"></i></th>
                                <th>Acciones</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($params_regalo as $fila) { ?>
                                <tr>
                                    <td><?php echo $fila['nombre'] ?></td>
                                    <td><?php echo $fila['descripcion'] ?></td>
                                    <td><?php echo $fila['disponible'] ?></td>
                                    <td><?php echo $fila['precio'] ?></td>
                                    <td align="center"><a href="ver_regalo/<?php echo $fila['id'] ?>"><i class="fa fa-search" title="Ver Datos"></i></a> <a href="modificar_regalo/<?php echo $fila['id'] ?>"><i class="fa fa-edit" title="Modificar"></i></a> <a href="eliminar_regalo/<?php echo $fila['id'] ?>"><i class="fa fa-trash-o" title="Eliminar"></i></a></td>
                                </tr>
<?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <hr>
        <a class="btn btn-primary" href="registro_regalo"><i class="fa fa-plus-circle"></i> Nuevo Regalo</a>
        <hr>
    </div>

    <?php
    $contenido = ob_get_clean();
    include "app/templates/template_admin.php";
    ?>